﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Drawing;
using System.Linq;
using System.Web;
using InformationCenter.SQLHelper;

namespace InformationCenter.Models
{
    public class MenuDefinition
    {
        [Key]
        public int Id { get; set; }
        [Required]
        [DisplayName("栏位名称")]
        public string Name { get; set; }
        [Required]
        [DisplayName("子菜单")]
        public List<MenuCommand> SubMenus { get; set; }

    }

    public class MenuCommand 
    {
        [Key]
        public int Id { get; set; }
        [Required]
        [DisplayName("菜单名称")]
        public string ItemCaption { get; set; }
        [Required]
        [DisplayName("业务类型")]
        public string ServiceType { get; set; }
        [DisplayName("图标")]
        public string Icon { get; set; }

        public int Level { get; set; }

        [Required]
        [DisplayName("链接")]
        public string Url { get; set; }
        [DisplayName("序号")]
        public int Itemseq { get; set; }
    }

    public class GroupAccess
    {
        [Key]
        public int Id { get;set; }

        [Required]
        [DisplayName("权限名")]
        public string GroupName { get; set; }
        [Required]
        [DisplayName("业务名称")]
        public string ServiceType { get; set; }

        [Required]
        [DisplayName("权限列表")]
        public List<AccessControl> AccessControls { get; set; } 


    }

    public class AccessControl
    {
        public int Id { get; set; }

        [Required]
        [DisplayName("权限名")]
        public string ServiceName { get; set; }

        public string DoSomething { get; set; }
    }


    public class ColumnList
    {
        [Key]
        public  int Id { get; set; }
        [DisplayName("栏目名称")]
        public string Name { get; set; }
        [DisplayName("序号")]
        public int Seq { get; set; }
        [DisplayName("图标")]
        public string Icon { get; set; }

        [DisplayName("链接")]
        public string Url { get; set; }

        [DisplayName("是否可见")]
        public bool Visible { get; set; }
    }

    public class ArticleList
    {
        [Key]
        public int Id { get; set; }
        [DisplayName("文章标题")]
        public string Name { get; set; }
        [DisplayName("Seo关键字")]
        public string SeoKeyword { get; set; }
        [DisplayName("文章摘要")]
        public string SeoSummary { get; set; }
        [DisplayName("图片")]
        public string Picture { get; set; }
        [DisplayName("分类")]
        public string Category { get; set; }
        [DisplayName("作者")]
        public string Writer { get; set; }
        [DisplayName("正文")]
        public string Context { get; set; }
        [DisplayName("创建时间")]
        public DateTime CreateDateTime { get; set; }
        [DisplayName("阅读次数")]
        public int ReadCount { get; set; }

        
    }

    public class Category
    {
        [Key]
        public int Id { get; set; }
        public string Name { get; set; }
        public string Value { get; set; }
    }

    public class ItemList
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public int  Qty { get; set; }

    }

}